package com.threadpool.pool;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * <p>
 * 线程工厂
 * </p>
 *
 * @author 桌角的眼镜
 * @version 1.0
 * @since 2025/5/14 0:50
 */
public class CustomThreadFactory {
    private final AtomicInteger count = new AtomicInteger(0);

    public Thread newThread(Runnable r) {
        return new Thread(r, "自定义-线程-" + count.getAndIncrement());
    }
}
